package com.neu.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neu.entity.RegistLevel;
import com.neu.mapper.RegistLevelMapper;
import com.neu.service.RegistLevelService;


@Service
public class RegistLevelServiceImpl implements RegistLevelService{
	@Autowired
	private RegistLevelMapper registLevelMapper;
	@Override
	public boolean addRegistLevel(RegistLevel registLevel) {
		// TODO Auto-generated method stub
		int save = registLevelMapper.addRegistLevel(registLevel);
		boolean flag = false;
		if(save>0) {
			flag = true;
		}
		return flag;
	}

	@Override
	public boolean delRegistLevel(int id) {
		// TODO Auto-generated method stub
		int del = registLevelMapper.delRegistLevel(id);
		boolean flag = false;
		if(del>0) {
			flag = true;
		}
		return flag;
	}

	@Override
	public boolean updateRegistLevel(RegistLevel registLevel) {
		// TODO Auto-generated method stub
		int upd = registLevelMapper.updateRegistLevel(registLevel);
		boolean flag = false;
		if(upd>0) {
			flag = true;
		}
		return flag;
	}

	@Override
	public List<RegistLevel> pageRegistLevel(int page, int limit) {
		// TODO Auto-generated method stub
		return registLevelMapper.pageRegistLevel(page, limit);
	}

	@Override
	public int pageRegistLevelTotal() {
		// TODO Auto-generated method stub
		return registLevelMapper.pageRegistLevelTotal();
	}

}
